package com.njust.dao;

import com.njust.bean.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface EmployeeDaoAnnotation {

    @Select("select from t_employee where id = #{id}")
    Employee getEmployeeById(Integer id);

    @Update("update t_employee set empname = #{empName} gender = #{gender}, email = #{email} where id = #{id}")
    int updateEmployee(Employee employee);

    @Delete("delete from t_employee where id = #{id}")
    boolean deleteEmployee(Integer id);

    @Insert("insert into t_employee (empname, gender, email) values (#{empName}, #{gender}, #{email})")
    boolean insertEmployee(Employee employee);
}
